import axios from "axios";
//import * as api from "../../../api/gw/index.js";
import getGoodsDate from "./getGoodsDate.js";
export default function (params,relGroup,callback, errFn) {
	let url =  window.api.config_host+'/resourceConfig/resource/activities_pic_coupons';
    let options = {
        method: "post",
        url: url,
        data: params,
        headers: {sessionId: getCookie("sessionId")}
    }
    console.log(relGroup,'新增')
    axios(options).then(data => {
    	
        if (data.status === 200 && data.data.returnCode === 1) {
            //修改成功
            console.log(relGroup,"发布成功");
            callback && getGoodsDate(callback,relGroup);
        } else {
            errFn && errFn();
        } 
    }).catch(err => {
        console.log(err);
        errFn && errFn();
    });
}
